package com.ysd.lis.controller.qi;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.qi.QiMajor;
import com.ysd.lis.service.qi.QiMajorService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author wh
 * @since 2025-03-03
 */
@RestController
@RequestMapping("/api/qi/major")
public class QiMajorController extends BaseController {

    @Autowired
    private QiMajorService qiMajorService;


    @ApiOperation("获取指标报表列表")
    @GetMapping("/getQiMajorList")
    public Result getQiMajorList() {
        return qiMajorService.getQiMajorList();
    }

    @ApiOperation("添加质量指标")
    @PostMapping("/addQiMajor")
    public Result addQiMajor(@RequestBody QiMajor qiMajor) {
        return qiMajorService.addQiMajor(qiMajor);
    }

    @ApiOperation("编辑质量指标")
    @PostMapping("/updateQiMajor")
    public Result updateQiMajor(@RequestBody QiMajor qiMajor) {
        return qiMajorService.updateQiMajor(qiMajor);
    }

    @ApiOperation("删除质量指标")
    @PostMapping("/deleteQiMajor")
    public Result deleteQiMajor(@RequestBody QiMajor qiIndexMain) {
        return qiMajorService.deleteQiMajor(qiIndexMain);
    }
}
